1. Field of the Invention
The present invention relates to an image data processing apparatus which performs data size conversion upon image data which have been imaged, for example, via color separation filters of the Bayer type, and to an electronic camera.
2. Description of the Related Art
There is a per se known type of electronic still camera which performs specified image processing upon image data produced from an image of a photographic subject which has been imaged through a photographic lens by an imaging device incorporating an imaging element such as a CCD or the like and outputted by the imaging device. In an imaging device of such an electronic still camera, a color separation filter is provided upon the imaging element for forming a colored image. FIG. 15 is a figure for explanation of a Bayer type color separation filter, in which primary color filters for R color, G color, and B color are arranged in a checkerboard pattern in correspondence to the pixels of the imaging element. As shown in FIG. 15, in this Bayer arrangement, a filter for the same color component is provided at each second pixel in both the horizontal direction and the vertical direction in which the pixels are arranged. It is necessary to treat image data which has been imaged through such a color separation filter in such a manner as to preserve the Bayer arrangement. This is because, if the Bayer arrangement is disturbed, it becomes impossible to reproduce the colors of the photographic subject from the image data.
In the case of performing reduction (shrinkage) size conversion upon the above described image data, if the pixel data are read out while subsampling or culling every second pixel, or every fourth pixel, . . . in the horizontal direction and in the vertical direction, i.e. at a multiple of two, the order of the color components which correspond to the pixel data before subsampling and the order of the color components of the pixel data which have been subsampled and read out agree with one another. The shaded pixels in FIG. 15 are the pixel positions in the case of reading out at a rate of one pixel every five pixels. When performing reduction size conversion by subsampling while reading out in this manner, it is only possible to perform size conversion at a reduction ratio by subsampling at a multiple of two in the horizontal direction and the vertical direction respectively, in other words at a fixed reduction ratio like 2/4, 2/6, . . . . Furthermore, even if it is arranged that the Bayer arrangement after performing reduction size conversion is not disturbed, the spatial frequency is reduced by the subsampling, which gives rise to the problem of undesirable generation of moire due to subsampling.